package com.haoshuang.zhouzhoubang.ui.adapter

import android.graphics.Color
import com.chad.library.adapter4.BaseQuickAdapter
import com.haoshuang.zhouzhoubang.R
import com.haoshuang.zhouzhoubang.databinding.ItemSkillLabel3Binding
import com.haoshuang.zhouzhoubang.model.bean.JlBean
import com.mufeng.libs.base.BaseBindingHolder
import com.mufeng.libs.base.BaseBindingQuickAdapter


/**
 * 技能标签列表适配器(蓝色)
 *
 */
class JlAdapter3(data: MutableList<JlBean>) :
    BaseBindingQuickAdapter<JlBean, ItemSkillLabel3Binding>(data) {

    override fun onBindViewHolder(holder: BaseBindingHolder, position: Int, item: JlBean?) {
        val binding = ItemSkillLabel3Binding.bind(holder.itemView)
        if (item?.isCheck == 1) {
            binding.tvSkill.setTextColor(Color.parseColor("#00B7F5"))
            binding.tvSkill.setBackgroundResource(R.drawable.recatangle_a5a396_strok)
        } else {
            binding.tvSkill.setBackgroundResource(R.drawable.bg_8h)
            binding.tvSkill.setTextColor(Color.parseColor("#333333"))
        }
        binding.tvSkill.text = item?.cate_name
    }
}